cmake_minimum_required(VERSION 3.19)
project(scrcpy C)

set(CMAKE_C_STANDARD 11)

add_executable(scrcpy
        app/src/main.c
        app/src/scrcpy.c
        app/src/scrcpy.h
        app/src/util/log.h
        app/src/cli.c
        app/src/cli.h
        app/src/compat.h
        app/src/android/input.h
        app/src/android/keycodes.h
        app/src/util/str_util.c
        app/src/util/str_util.h
        app/src/config.h
        app/src/command.c
        app/src/command.h
        app/src/common.h
        app/src/sys/command.c
        app/src/control_msg.c
        app/src/control_msg.h
        app/src/util/buffer_util.h
        app/src/controller.c
        app/src/controller.h
        app/src/receiver.c
        app/src/receiver.h
        app/src/util/cbuf.h
        app/src/util/net.h
        app/src/util/lock.h
        app/src/util/net.c
        app/src/util/queue.h
        app/src/device.c
        app/src/device.h

        app/src/device_msg.c
        app/src/device_msg.h
        app/src/event_converter.c
        app/src/event_converter.h
        app/src/events.h
        app/src/decoder.c
        app/src/decoder.h
        app/src/recorder.c
        app/src/recorder.h
        app/src/video_buffer.c
        app/src/video_buffer.h
        app/src/fps_counter.c
        app/src/fps_counter.h
        app/src/file_handler.c
        app/src/file_handler.h
        app/src/input_manager.c
        app/src/input_manager.h
        app/src/opengl.c
        app/src/opengl.h
        app/src/screen.c
        app/src/screen.h
        app/src/server.c
        app/src/server.h
        app/src/stream.c
        app/src/stream.h
        app/src/tiny_xpm.c
        app/src/tiny_xpm.h)
include_directories(app/src/)
target_link_libraries(scrcpy SDL2 pthread avformat avcodec avutil)